﻿<uc:ButtonPresenterControl x:Class="SBPweb.PhotoGallery.Client.ViewToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:uc="clr-namespace:SBPweb.PhotoGallery.Client"
    Height="28">
    <Grid Background="Transparent">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <ProgressBar Name="pb" Grid.ColumnSpan="4" Opacity="0.5" Minimum="0" Maximum="100" />
        <!--Rectangle Name="rHeader" RadiusX="5" RadiusY="5" Fill="Transparent" Opacity="0.5" Grid.ColumnSpan="4" /-->
        <StackPanel Orientation="Horizontal" Grid.Column="0" Background="Transparent" Margin="3,3,3,3">
            <Button Name="buttonFirst" Style="{StaticResource rImageButton}" DataContext="M8.5,6.5 L4.5,10.5 L8.5,14.5 Z M14.5,6.5 L10.5,10.5 L14.5,14.5 Z" Click="ImageButton_First_Click" />
            <Button Name="buttonPrev" Style="{StaticResource rImageButton}" DataContext="M11.5,6.5 L7.5,10.5 L11.5,14.5 Z" Click="ImageButton_Prev_Click" />
            <Button Name="buttonPause" Style="{StaticResource rImageButton}" Click="ImageButton_Pause_Click">
                <Path Name="buttonPauseStroke" Stroke="{Binding BorderBrush}" StrokeThickness="2" Fill="{Binding BorderBrush}" Data="M8,6 v9 M12,6 v9" />
                <Button.Resources>
                    <Storyboard x:Name="buttonPauseStoryboard" AutoReverse="True" RepeatBehavior="Forever" Duration="0:0:0.5">
                        <DoubleAnimation
                            Storyboard.TargetName="buttonPause"
                            Storyboard.TargetProperty="Opacity"
                            Duration="0:0:0.3"
                            From="0.3"
                            To="0.8"/>
                    </Storyboard>
                </Button.Resources>
            </Button>
            <Button Name="buttonPlay" Style="{StaticResource rImageButton}" DataContext="M10.5,6.5 L14.5,10.5 L10.5,14.5 Z" Click="ImageButton_Play_Click">
                <Canvas>
                    <Path Name="buttonPlayStroke" Stroke="{Binding BorderBrush}" StrokeThickness="2" Data="M7,6 v9" />
                    <Path Name="buttonPlayFill" Stroke="{Binding BorderBrush}" StrokeThickness="1" StrokeLineJoin="Round" Fill="{Binding BorderBrush}" Data="M10.5,6.5 L14.5,10.5 L10.5,14.5 Z" />
                </Canvas>
            </Button>
            <Button Name="buttonNext" Style="{StaticResource rImageButton}" DataContext="M8.5,6.5 L12.5,10.5 L8.5,14.5 Z" Click="ImageButton_Next_Click" />
            <Button Name="buttonLast" Style="{StaticResource rImageButton}" DataContext="M5.5,6.5 L9.5,10.5 L5.5,14.5 Z M11.5,6.5 L15.5,10.5 L11.5,14.5 Z" Click="ImageButton_Last_Click" />
        </StackPanel>
        <Grid Grid.Column="1" Margin="3,3,3,3">
            <TextBlock Name="tbTitle" Foreground="{Binding BorderBrush}" VerticalAlignment="Center" />
        </Grid>
        <StackPanel Orientation="Horizontal" Grid.Column="2" Background="Transparent" Margin="3,3,3,3">
            <Button Name="buttonFullScreen" Style="{StaticResource rImageButton}" DataContext="M3.5,3.5 h7 v6 h-7 v-6 M11,11 l3,3 M12,14.5 h3 M14.5,12 v3" Click="ImageButton_FullScreen_Click">
                <Path Name="buttonFullScreenPath" Stroke="{Binding BorderBrush}" StrokeThickness="1" StrokeDashArray="1,2" Data="M3.5,3.5 h13 v13 h-13 v-13"/>                
            </Button>
            <Button Name="buttonSave" Style="{StaticResource rImageButton}" Click="ImageButton_Save_Click" Visibility="Collapsed">
                <Canvas>
                    <Path Name="buttonSaveStroke" Stroke="{Binding BorderBrush}" StrokeThickness="1" Data="M3.5,16 v-12.5 h13 v13 h-12.5 M5.5,3.5 v7 h9 v-7 M7.5,16.5 v-4 h5 v4"/>
                    <Path Name="buttonSaveFill" Fill="{Binding BorderBrush}" Data="M9,16.5 v-4 h4 v4"/>
                </Canvas>
            </Button>
        </StackPanel>
    </Grid>
</uc:ButtonPresenterControl>
